<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>

<head>
	<meta charset="UTF-8">
	<title>用户注册</title>
	<link rel="shortcut icon" href="${pageContext.request.contextPath}/image/logo/xyz.ico" type="image/x-icon" />
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/login.css">
	
	<script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/regist.js"></script>
	
</head>

<body>

	<!-- ----------------------------------- start 注册表单 ----------------------------------- -->
	<div>
		<form id="registForm" action="${pageContext.request.contextPath}/UserServlet" method="post">
			<input type="hidden" name="method" value="register"/>
			<div class="regist">
				<div class="regist_center">
					<div class="regist_top">
						<div class="left fl">会员注册</div>
						<div class="right fr">
							<a href="${pageContext.request.contextPath}/jsps/users/login.jsp"target="_self">已有账号？去登录&gt;&gt;</a>
						</div>
						<div class="clear"></div>
						<div class="xian center"></div>
					</div>
					<div class="regist_main center">

						<div class="username" id="username">
							用&nbsp;&nbsp;户&nbsp;&nbsp;名:&nbsp;&nbsp;
							<input class="shurukuang" type="text" name="username" placeholder="请输入你的用户名" value="${form.username }" />
							<c:choose>
								<c:when test="${!empty messages.username }">
									<span>${messages.username }</span>
								</c:when>
								<c:otherwise>
									<span>用户名长度在5-25个字符之间</span>
								</c:otherwise>
							</c:choose>
						</div>

						<div class="username" id="password">
							密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码:&nbsp;&nbsp;
							<input class="shurukuang" type="password" name="password" placeholder="请输入你的密码" value="${form.password }" />
							<span>用户名长度在6-20个字符之间</span>
						</div>

						<div class="username" id="confirmPassword">
							确认密码:&nbsp;&nbsp;
							<input class="shurukuang" type="password" name="repassword" placeholder="请确认你的密码" />
							<span>两次密码要输入一致哦</span>
						</div>

						<div class="username" id="phone">
							手&nbsp;&nbsp;机&nbsp;&nbsp;号:&nbsp;&nbsp;
							<input class="shurukuang" type="text" name="phone" placeholder="请填写正确的手机号"  value="${form.phone }" />
							<span>填写下手机号吧，方便我们联系您！</span>
						</div>

						<div class="username" id="email">
							email:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<input class="shurukuang" type="text" name="email" placeholder="请填写正确的email" value="${form.email }" />
							<c:choose>
								<c:when test="${!empty messages.email}">
									<span>${messages.email}</span>
								</c:when>
								<c:otherwise>
									<span>用于激活用户！</span>
								</c:otherwise>
							</c:choose>
							
						</div>

						<div class="username">
							<div class="left fl">
								验&nbsp;&nbsp;证&nbsp;&nbsp;码:&nbsp;&nbsp;
								<input class="yanzhengma" type="text" name="code" placeholder="请输入验证码" />
							</div>
							<div class="right fl">
								<img src="${pageContext.request.contextPath}/image/yanzhengma.jpg"/>
							</div>
							<div class="clear"></div>
						</div>
					</div>
					<div class="regist_submit">
						<input class="submit" name="submitBtn" id="submitBtn" value="立即注册" style="text-align: center;"/>
					</div>

				</div>
			</div>
		</form>
	</div>
	<!-- ----------------------------------- end 注册表单 ----------------------------------- -->
</body>

</html>